<template>
	<view class="container">
		<image :src="$getImgUrl('home/bg.png')" mode="aspectFill" class="img-bg"></image>

		<uni-header class="header" background="" :border="false" title="盲盒"></uni-header>
		<view class="detail-view flex-col" :style="{ height: $screenHeight() + 'px' }">
			<view :style="{ height: $statusBarHeight() + 65 + 'px' }"></view>

			<view class="goods-view-list flex-center">
				<view v-if="goodsList.length == 1" class="img-view flex-col-center" :style="'background: url(' + $getImgUrl('home/ic_k.png') + ') no-repeat;'">
					<image :src="goodsList[0].img" mode="aspectFill"></image>
					<view class="name">{{ goodsList[0].name }}</view>
				</view>

				<view class="list-view flex-row" v-else>
					<view class="goods-view-item" v-for="(item, index) in goodsList" :key="index">
						<image :src="item.img" mode="aspectFill"></image>
						<view class="kuan">{{ $textEllipsis(item.name, 4) }}</view>
					</view>
				</view>
			</view>

			<view class="goods-view">
				<view class="btn-view flex-row-center">
					<view class="btn-item flex-center" @click="onUnlike">不喜欢，回收</view>
					<view class="btn-item one-btn flex-center" @click="onBack">再来一发</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script src="./result.js"></script>

<style lang="scss">
@import './result.scss';
</style>
